Revised by: Developer Technical Support and QuickTime Engineering December 1994
Written by: Developer Technical Support and QuickTime Engineering May 1993
This Tech Note is an addendum to the QuickTime for Windows, Developer's Manual, Release 2.0. It will contain technical details of QuickTime missing in the documentation, updated information, bug fixes and similar information. The subtitles are based on the QuickTime Publication with the addition of new titles related to additional information not present in the documentation.
We assume that developers use QuickTime for Windows 2.0 or later versions, any older versions are no longer supported by DTS.
Table of Contents
QUICKTIME FOR WINDOWS DEVELOPERS MANUAL
Movie Controller
QTW Requires Movie and Controller to be in Same Window
Playing Movies through a Movie Controller
QTW Always Preroll
Getting Pictures from Movies
GetMoviePict Slowness
COMPONENTS AND DECOMPRESSORS
Optimization Options in Codecs
WINDOWS SYSTEM CONFIGURATION
QTW Installation, CD-ROM Drives, DLLs and Component Files
QTW.LIB Use with Other Windows Developer Environments
32-Bit Libraries, QTW
Edit QTW.INI file for Special Configurations
GDI and QTW
WinG and DCI Support, QTW?
Creating QuickTime Movies to Play on a PC
CROSS-PLATFORM ISSUES
Conditions for Playing Macintosh Movies on Windows
QUICKTIME FOR WINDOWS DEVELOPERS MANUAL
Movie Controller
QTW Requires Movie and Controller to be in Same Window
The current implementation of QuickTime for Windows prevents having a movie in one window and a controller in another. Both pieces are expected to share the same parent window. One way to get around this is to do the following:
1. Create a window in which you set up a movie and an invisible controller.
2. Create another window in which you set up the same movie attached to a visible controller, with the controller bounds set to be exactly equal to the controller Rect so that the movie doesn’t show at all.
3. Set an action filter proc for the second controller so that you know which actions take place because of user actions. See MCSetActionFilter.
4. Propagate the necessary actions to the first (invisible) filter to make the visible movie react to the controller action. See MCDoAction.
This requires a lot of redundancy, but it’s a way to get the effect you want.
Playing Movies through a Movie Controller
QTW Always Preroll
It is of utmost importance that you preroll your movies using the PrerollMovie function. Failing to do so will introduce playback problems. especially when the movie starts. PrerollMovie will fill caches and buffers optimally to prevent initial playback stuttering.
You should call this function before you start the movie with the MCDoAction mcActionPlay call.
Getting Pictures from Movies
GetMoviePict Slowness
Q: Why is GetMoviePict slow?
___
A: The reason this call is slow is that it needs to back all the way to the key frame and build the real PICT with the deltas. Having lots of key frames in the movie should somewhat speed up the function.
Another, faster approach is to let the Movie Controller step the movie one frame at a time and display this frame.
COMPONENTS AND DECOMPRESSORS
Optimization Options in Codecs
Q: My codec is never given any other optimization options than OPT_RAW. In other words the optt field in the decompression parameter structure is always set to this value. How do I get to support OPT_BMP and differenced bitmap decompression strategies?
___
A: You need to explicitly define the codec capabilities for your codec so that the capabilities state that OPT_BMP and other supported optimization options are supported by your codec. See the Data structures section of the Components and Decompressors QTW document for more details about the CodecCapabilities data structure.
WINDOWS SYSTEM CONFIGURATION
QTW Installation, CD-ROM Drives, DLLs and Component Files
Do not place the QTW DLL and Component Files on the title CD-ROM:
a) Windows DLL conflicts are resolved by the name of the DLL files. The end user will encounter problems if there are old versions of the DLL on the CD-ROM while the hard disk has a new DLL version.
b) The performance of having DLL and Component files executing from a CD-ROM drive is very poor compared with having the right files installed on the system hard disk.
You must follow the instructions of the installation documentation when you use the SETUP.EXE install program.
QTW.LIB Use with Other Windows Developer Environments
Q: We would like to use the QTW.LIB library with a LISP environment for Windows. Are the QT DLLs self-contained, and does the QTW.LIB do anything else than defines the DLL interface? If each of the QTW functions exist in a public or exported form in the DLLs I could make use of the functions from my development environment.
___
A: The QTW.LIB file contains static code, so in this case you can't directly use the library. Instead you could write another DLL that links in the needed QTW functions, and you could then export the functions needed from this other DLL.
Another solution is to either use the QuickTime VBX or the MCI driver provided with QTW 2.0, assuming these two solutions provide the functionality you need.
32-Bit Libraries, QTW
The current QTW Libraries are 16-bit, not 32-bit. This might cause problems with development environments that enforce 32-bit library use. Note that the code produced with the current 16-bit libraries works fine with NT and Win32 environments.
Edit QTW.INI file for Special Configurations
Q: The demo programs on the final QuickTime for Windows CD won’t run without locking up, because the QTInitialize function doesn’t return. Any ideas?
___
A: The final QuickTime for Windows exhibits the behavior you describe when the display board is configured in a way that QuickTime for Windows doesn’t recognize. XGA and SuperVGA are modes that could cause this problem. To check whether this is the problem, edit the QTW.INI file to include the following:
[Video]
Optimize = driver
The default is Hardware. This could be causing the problem you describe.
GDI and QTW
Q: Is there a way to force QTW to use GDI?
___
A: Yes, by changing the video parameter in the QTW.INI file, as in:
video = bmp
; or
video = dib
In some cases the installation will actually set this value, as in the case of the current installer program installing QTW in an NT environment.
WinG and DCI Support, QTW?
Q: Will QTW support WinG or DCI?
___
A: Currently QTW does not support WinG or the DCI model. Stay tuned for more information concerning future QTW products development.
Creating QuickTime Movies to Play on a PC
Q: I’m trying to create a QuickTime movie on my Macintosh and play it on a PC using the standard QuickTime Play Movie application that came with QuickTime for Windows. I get the message “Movie X contains a data reference. Data references aren’t supported by the current version of QuickTime for Windows,” even after flattening the file and removing file dependencies. What do I have to do to eliminate these data references and build movies that I can play on the PC?
___
Q: This problem occurs when Macintosh QuickTime 1.0 or its utilities are used to create the movies. The solution is to edit (or create) the QTW.INI file to include the following lines:
[Override]
DREF = no
This should force QuickTime for Windows to look in the file for the data. A better solution is to update your Macintosh software to the latest QuickTime extension and related utilities.
CROSS-PLATFORM ISSUES
Conditions for Playing Macintosh Movies on Windows
Q: Is there anything different between Windows movies and Macintosh movies? How can we get Macintosh movies to play on Windows?
___
A: There’s no difference between Macintosh and Windows movies. The conditions that need to be met to get Macintosh movies to play on Windows are:
• The movie must be self-contained.
• The movie must be in a single-fork file.
No limitations apply other than these. We’ve successfully converted movies using Movie Converter in the QuickTime Developer Toolkit.